Set Text
AutomatR.Windows.Activities.SetText
The "Set Text" activity in AutomatR is designed for UI Automation within Windows applications. It allows you to write a string to the Text attribute of a specified UI element, facilitating data entry and manipulation in automation workflows.
Properties
Name | Description |
---|---|
Input | |
Clear Text | When enabled, it clears the content of the element before writing new content to it. |
Element | Select the browse button to indicate the element on the app with the help of the Window selector window. |
Text | Enter the string text in the text box as per the UI element selected. |
Selector | Windows Selector - Editor for selecting UI elements within the Windows application. |
Misc | |
Display Name | Provides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before starting the "Set Text" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1. |
Timeout | Enter the time in seconds (e.g., 5) for the activity to be executed before throwing an exception. If not provided, the default timeout value is used. |
How to use:
- Drag and drop the "Set Text" activity onto the workflow.
- Configure the properties by providing either the Element or Selector, specifying the text to be set, and choosing whether to clear existing text.
- Optionally, configure the Delay and Timeout properties.
- Execute the workflow to write the specified text to the designated UI element.
Example: Consider an example where the "Set Text" activity is used to set a text value in a text box:
Set Text:
Element: [Selector indicating the text box]
Text: "Hello, AutomatR!"
Clear Text: true
Delay: 2
Timeout: 10
In this example, the activity sets the text "Hello, AutomatR!" in the specified text box element, clearing any existing text, introducing a 2-second delay, and a timeout of 10 seconds for the operation.